G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdkDrawContext, gdk_draw_context, G_TYPE_OBJECT)
+static void
+gdk_draw_context_default_surface_resized (GdkDrawContext *context)
+{
+}
+
static void
gdk_draw_context_dispose (GObject *gobject)
{
gobject_class->get_property = gdk_draw_context_get_property;
gobject_class->dispose = gdk_draw_context_dispose;
+ klass->surface_resized = gdk_draw_context_default_surface_resized;
+
/**
* GdkDrawContext:display:
*
priv->is_drawing = FALSE;
}
+/*< private >
+ * gdk_draw_context_surface_resized:
+ * @context: a #GdkDrawContext
+ *
+ * Called by the #GdkSurface the @context belongs to when the size of the surface
+ * changes.
+ */
+void
+gdk_draw_context_surface_resized (GdkDrawContext *context)
+{
+ GDK_DRAW_CONTEXT_GET_CLASS (context)->surface_resized (context);
+}
+
/**
* gdk_draw_context_get_display:
* @context: a #GdkDrawContext
void (* end_frame) (GdkDrawContext *context,
cairo_region_t *painted,
cairo_region_t *damage);
+ void (* surface_resized) (GdkDrawContext *context);
};
gboolean gdk_draw_context_is_drawing (GdkDrawContext *context);
cairo_region_t *painted,
cairo_region_t *damage);
+void gdk_draw_context_surface_resized (GdkDrawContext *context);
+
G_END_DECLS
#endif /* __GDK__DRAW_CONTEXT_PRIVATE__ */
void
_gdk_surface_update_size (GdkSurface *surface)
{
+ GSList *l;
+
+ for (l = surface->draw_contexts; l; l = l->next)
+ gdk_draw_context_surface_resized (l->data);
+
gdk_surface_clear_old_updated_area (surface);
recompute_visible_regions (surface, FALSE);
}